package com.example.sicnuaccountingapp.ui.statistics

import com.example.sicnuaccountingapp.data.entity.Category
import java.time.LocalDateTime

sealed class StatisticsUiState {
    object Loading : StatisticsUiState()
    data class Success(
        val totalIncome: Double,
        val totalExpense: Double,
        val categoryExpenses: List<CategoryExpense>,
        val dailyExpenses: Map<LocalDateTime, Double> = emptyMap(),
        val categoryPercentages: Map<Long?, Double> = emptyMap(),
        val monthlyTrend: Map<LocalDateTime, Pair<Double, Double>> = emptyMap(),
        val weekdayStats: Map<Int, Double> = emptyMap()
    ) : StatisticsUiState()
    data class Error(val message: String) : StatisticsUiState()
}

data class CategoryExpense(
    val category: Category,
    val amount: Double
) 